package threadcreate01;

public class thread01 {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                int i = 0;
                while (i < 100) {
                    System.out.println("线程1：" + i++);
                }
            }
        }).start();
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                int j = 0;
                while (j < 100) {
                    System.out.println("线程2:" + j++);
                }
            }
        };
        Thread thread = new Thread(runnable);
        thread.start();
    }
}
